package com.boxs;

import java.util.Scanner;

public class Circle {
    public final double PI = 3.14;

    public Circle(){
        System.out.println("无参数的构造函数：为R赋值为---");
    }

    public void area(Double r){
        System.out.println(r);
        System.out.println("圆的面积："+PI*r*r);
    }

    public void girth(Double r){
        System.out.println(r);
        System.out.println("圆的周长："+PI*r*2);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入半径：");
        String s = sc.nextLine();
        Circle circle = new Circle();
        circle.area(Double.parseDouble(s));
        circle.girth(Double.parseDouble(s));
    }

}
